/*
 * Selling Partner API for Orders
 *
 * Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support tools.   _Note:_ For the JP, AU, and SG marketplaces, the Orders API supports orders from 2016 onward. For all other marketplaces, the Orders API supports orders for the last two years (orders older than this don't show up in the response).
 *
 * The version of the OpenAPI document: v0
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = software.amzn.spapi.Client.OpenAPIDateConverter;

namespace software.amzn.spapi.Model.orders.v0
{
    /// <summary>
    /// Buyer information.
    /// </summary>
    [DataContract(Name = "BuyerInfo")]
    public partial class BuyerInfo : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BuyerInfo" /> class.
        /// </summary>
        /// <param name="buyerEmail">The anonymized email address of the buyer..</param>
        /// <param name="buyerName">The buyer name or the recipient name..</param>
        /// <param name="buyerCounty">The county of the buyer.  **Note**: This attribute is only available in the Brazil marketplace..</param>
        /// <param name="buyerTaxInfo">buyerTaxInfo.</param>
        /// <param name="purchaseOrderNumber">The purchase order (PO) number entered by the buyer at checkout. Only returned for orders where the buyer entered a PO number at checkout..</param>
        public BuyerInfo(string buyerEmail = default(string), string buyerName = default(string), string buyerCounty = default(string), BuyerTaxInfo buyerTaxInfo = default(BuyerTaxInfo), string purchaseOrderNumber = default(string))
        {
            this.BuyerEmail = buyerEmail;
            this.BuyerName = buyerName;
            this.BuyerCounty = buyerCounty;
            this.BuyerTaxInfo = buyerTaxInfo;
            this.PurchaseOrderNumber = purchaseOrderNumber;
        }

        /// <summary>
        /// The anonymized email address of the buyer.
        /// </summary>
        /// <value>The anonymized email address of the buyer.</value>
        [DataMember(Name = "BuyerEmail", EmitDefaultValue = false)]
        public string BuyerEmail { get; set; }

        /// <summary>
        /// The buyer name or the recipient name.
        /// </summary>
        /// <value>The buyer name or the recipient name.</value>
        [DataMember(Name = "BuyerName", EmitDefaultValue = false)]
        public string BuyerName { get; set; }

        /// <summary>
        /// The county of the buyer.  **Note**: This attribute is only available in the Brazil marketplace.
        /// </summary>
        /// <value>The county of the buyer.  **Note**: This attribute is only available in the Brazil marketplace.</value>
        [DataMember(Name = "BuyerCounty", EmitDefaultValue = false)]
        public string BuyerCounty { get; set; }

        /// <summary>
        /// Gets or Sets BuyerTaxInfo
        /// </summary>
        [DataMember(Name = "BuyerTaxInfo", EmitDefaultValue = false)]
        public BuyerTaxInfo BuyerTaxInfo { get; set; }

        /// <summary>
        /// The purchase order (PO) number entered by the buyer at checkout. Only returned for orders where the buyer entered a PO number at checkout.
        /// </summary>
        /// <value>The purchase order (PO) number entered by the buyer at checkout. Only returned for orders where the buyer entered a PO number at checkout.</value>
        [DataMember(Name = "PurchaseOrderNumber", EmitDefaultValue = false)]
        public string PurchaseOrderNumber { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class BuyerInfo {\n");
            sb.Append("  BuyerEmail: ").Append(BuyerEmail).Append("\n");
            sb.Append("  BuyerName: ").Append(BuyerName).Append("\n");
            sb.Append("  BuyerCounty: ").Append(BuyerCounty).Append("\n");
            sb.Append("  BuyerTaxInfo: ").Append(BuyerTaxInfo).Append("\n");
            sb.Append("  PurchaseOrderNumber: ").Append(PurchaseOrderNumber).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
